﻿<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="AServiceOrganizationFrame.ascx.cs"
    Inherits="AB.ServiceDirectory.Design.WebUserControls.Frame.AServiceOrganizationFrame" %>

    <%@ Register src="RoleFrame.ascx" tagname="RoleFrame" tagprefix="uc1" %>
<asp:UpdatePanel ID="UpdatePanel1" runat="server">
    <ContentTemplate>
        <asp:Panel ID="GridViewOrgnizationService" ClientIDMode="Static" runat="server" EnableViewState="false">
            <asp:GridView ID="GridViewServiceOrganization" DataKeyNames="ServiceId,OrganizationId"
                CssClass="tablesorter" runat="server" EmptyDataText="No data available" AutoGenerateColumns="False" 
                AllowPaging="True" PageSize="15" AllowSorting="True" 
                DataSourceID="ObjectDataSourceOrganizationService" 
                >
                <Columns>
                    <asp:TemplateField SortExpression="OrganizationName" HeaderText="Organization Name">
                        <ItemTemplate>
                            <%#Eval("Organization.OrganizationName")%>
                        </ItemTemplate>
                        <HeaderStyle CssClass="header" />
                        <ItemStyle Width="150px" />
                    </asp:TemplateField>
                    <asp:BoundField DataField="Description" HeaderText="Description" SortExpression="Description">
                        <HeaderStyle CssClass="header" />
                    </asp:BoundField>
                    <asp:BoundField DataField="Roles" HeaderText="Roles" SortExpression="Roles">
                        <HeaderStyle CssClass="header" />
                    </asp:BoundField>
                    <asp:TemplateField>
                        <ItemTemplate>
                                <i><asp:LinkButton ID="LinkButton1" runat="server"  CommandArgument='<%#Eval("Roles") %>' CauseValidation="False" CommandName="updateRoles"  OnCommand="LinkButtonEditRole_Command" CausesValidation="False">edit roles</asp:LinkButton></i>
                        </ItemTemplate>
                        <ItemStyle Width="70px" />
                    </asp:TemplateField>
                </Columns>
                <EmptyDataTemplate>
                    <blockquote>
                        There are no items to show.</blockquote>
                </EmptyDataTemplate>
                <PagerStyle CssClass="pagination_table" />
            </asp:GridView>
            <asp:HiddenField ID="HiddenFieldServiceId1" runat="server" />
            <asp:HiddenField ID="HiddenFieldOrganizationId" runat="server" />
            <asp:HiddenField ID="HiddenFieldRoles" runat="server" />
            <asp:ObjectDataSource ID="ObjectDataSourceOrganizationService" runat="server" SelectMethod="PagingServiceOrganisationService"
                TypeName="AB.ServiceDirectory.BO.AServiceOrganisationBO" OnSelecting="ObjectDataSourceOrganizationServiceSelecting"
                EnablePaging="true" SelectCountMethod="GetServiceOrganisationCount" StartRowIndexParameterName="startRowIndex"
                MaximumRowsParameterName="maxRows" >
                <SelectParameters>
                    <asp:Parameter Name="filter" Type="Object" ConvertEmptyStringToNull="false" />
                </SelectParameters>
            </asp:ObjectDataSource>
        </asp:Panel>
    </ContentTemplate>
</asp:UpdatePanel>
<uc1:RoleFrame ID="RoleFrame1" runat="server"/>

